obj-m += monitoring-module.o statistics-module.o
PID = 1

all:
	make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) modules

clean:
	make -C /lib/modules/$(shell uname -r)/build/ M=$(PWD) clean
	rm jp-monitoringmodule
	rm jp-statisticsmodule

install: monitoring-module.ko statistics-module.ko
	insmod monitoring-module.ko pid=$(PID)
	insmod statistics-module.ko
	mknod /dev/process-statistics c 200 200

remove:
	rm /dev/process-statistics
	rmmod statistics-module
	rmmod monitoring-module

test: jp-monitoringmodule.c
	gcc -o jp-monitoringmodule jp-monitoringmodule.c
	gcc -o jp-statisticsmodule jp-statisticsmodule.c
